The present invention relates to a median filter, and more particularly, to a circular median filter which can provide a median value with respect to data expressed as magnitudes or angles.
A median filter is a non-linear filter which outputs data of a medium magnitude as a median value among a predetermined number of data. The median filter has an excellent filter characteristics in which impulse noise is removed from the received data effectively and a boundary portion of an image does not deteriorate. Having theses characteristics, the median filter is widely used for video signal processing in TVs or medical equipment.
FIG. 1 shows an existing median filter, particularly a four degree median filter. In FIG. 1, median cells 11-15 store five data values which are recently input. The five data values stored in the median cells 11-15 are sorted in a descending order from the data value stored in the leftmost median cell 11. The data value DATA.sub.-- IN input to the median filter of FIG. 1 is individually compared with the stored data values in the median cells 11-15. Then, according to the comparison result, the input data is stored in one of th median cells 11-15 in a manner that a descending order is maintained. At the same time, the data which was firstly input to the median filter of FIG. 1 is deleted. In this manner, the data stored in the respective median cells 11-15 always maintain a descending order. As a result, the median filter can output a middle value stored in the median cell 13 which is positioned in the middle of the median cells 11-15, as a median value OUT.
FIG. 2A shows a definition domain of data expressed as magnitudes on a line segment AB, in which A is a minimum value and B is a maximum value. When the median filter of FIG. 1 sorts five data values X[0], X[1], X[2], X[3] and X[4] expressed as magnitudes as shown in FIG. 2A, the median filter is appropriate to the case where a median value is provided considering only magnitudes of the input data because the data X[3] is the middle value. Meanwhile, FIG. 2B shows a definition domain of data expressed as angles on a circle C, in which angles "0" and "2.pi." correspond to the same point on the circle C. Therefore, points on the circle C corresponding to angles have a circularly corresponding relationship as angle increases. In the case when the following data belonging to the definition domain shown in FIG. 2B are input, EQU R[0]=.theta..sub.1, R[1]=.theta..sub.2, R[2]=.theta..sub.3, R[3]=2.pi.-.theta..sub.1, R[4]=2.pi.-.theta..sub.2
where 0&lt;.theta..sub.1 &lt;.theta..sub.2 &lt;.theta..sub.3 &lt;.pi./2, PA1 since the existing median filter compares only magnitudes of data, R[2] is output as a median value, which is not a desired median value. The desired median value is Rx[0] as shown in FIG. 2B. Thus, the existing median filter does not provide an appropriate median value with respect to data expressed as angles. PA1 a plurality of median cells in response to externally input data for deleting the firstly input data among a plurality of prestored data and sorting a plurality of data including the remaining prestored data and the newly input data after deletion of the firstly input data on the basis of a data magnitude; and a median determiner for receiving the sorted data output from the plurality of median cells, selecting particular data corresponding to a maximum distance from the received sorted data, and outputting the selected particular data as median data.